<?php
/**
 * cookie
 * @author yuwei
 *
 */
class BluePhp_Library_Cookie_Adapter
{
	/**
	 * set cookie
	 *
	 * @param unknown_type $key
	 * @param unknown_type $value
	 */
	public static function set($key,$value)
	{
		setcookie($key,$value,time() + COOKIE_LIFETIME);
	}
	
	/**
	 * get cookie
	 *
	 * @param unknown_type $key
	 * @return unknown
	 */
	public static function get($key = '')
	{
		if($key) 
			return isset($_COOKIE[$key])?$_COOKIE[$key]:'';
		else 
			return $_COOKIE;
	}
}
?>